var li1, li2;

function init6() {
    li1 = document.querySelector(".x-foot");
    li2 = document.querySelector(".peizhi-foot")

    new CreateTab(li1);
    new CreateTab(li2)
}

class CreateTab{
   constructor(ele){
    this.spans = ele.querySelectorAll('span')
    console.log(this.spans);
    this.clickHandler()
   }
   clickHandler(){
    for(let i=0;i<this.spans.length;i++){
        this.spans[i].onclick=()=>{
            for(let j=0;j<this.spans.length;j++){
                this.spans[j].style.color='#999999'
                this.spans[j].style.borderColor="#DADADA"

            }
            this.spans[i].style.color='red'
            this.spans[i].style.borderColor="red"

        }
    }
   }
  
}


export default {
    init6
}